The present invention relates to image processing apparatuses which are utilized for digital photoprinters for photoelectrically reading images recorded on films to obtain prints (photographs) that are reproduced from the images.
Images recorded on photographic films (hereinafter called the films) such as negative films, reversal films and the like have conventionally been printed out on photosensitive material (photographic paper) by projecting the on-film image onto the photosensitive material so that the photosensitive material is subjected to surface exposure or so-called direct exposure (analog exposure).
On the other hand, printing apparatus utilizing digital exposure have been put to practical use in recent years. More specifically, a digital photoprinter is used for printing (finishing) an image recorded on a film through the steps of reading the image photoelectrically, converting the read-out image into a digital signal, performing various kinds of image processing in order to obtain image data to be recorded, subjecting photosensitive material to scanning exposure by means of the recording light modulated according to the image data, whereby to record the image (latent image) and developing the recorded image.
As exposure conditions at the time of printing can be determined by processing images with digital data as image data in the digital photoprinter, high-quality prints that have been unavailable until now become obtainable by such as making compensation for image fade-out and improper gradation such as washed-out highlight and dull shadow originating from backlight, electronic flashing and the like, sharpness processing, compensation for color or density failure, compensation for under- or over-exposure, compensation for insufficient quantity of light in a periphery and the like. Moreover, a composite photograph using a plurality of images, image division, a composition of characters and the like can be attained by processing the image data. The image data processing also makes it possible to output edited/processed prints freely in accordance with an intended use.
Furthermore, the digital photoprinter makes image data applicable for other purposes than photography, since the photoprinter allows images to be outputted as prints (photographs) and also allows the image data to be not only supplied to a computer, for example, but also stored in optical and/or magnetic recording media such as floppy disks.
Such digital photoprinter as described above essentially comprises a scanner (image reading apparatus) for reading an image recorded on a film photoelectrically, an image-processing apparatus for subjecting the read-out image to image processing in order to provide image recording data (exposure conditions) and a printer (image recording apparatus) for subjecting photosensitive material to scanning exposure according to the image data outputted from the image-processing apparatus and then for subjecting the exposed photosensitive material to developing processing for printing purposes.
The operation of the scanner includes making read light emitted from a light source incident on a film to obtain projected light for carrying an image recorded on the film, effecting image formation in an image sensor such as a charge coupled device (CCD) by means of an image forming lens so as to read the image by subjecting the projected light to photoelectric conversion, performing various kinds of image processing as the occasion demands and sending data concerning the on-film image (image data signal) to the image-processing apparatus.
The operation of the image-processing apparatus includes setting image processing conditions according to the image data read by the scanner, applying image processing corresponding to the set conditions to the image data and sending output image recording data (exposure conditions) to the printer.
The operation of the printer, that is, a printer utilizing light beam scanning exposure, for example, includes modulating a light beam according to the image data sent from the image-processing apparatus, forming a latent image by scan-exposing (printing) the photosensitive material two-dimentionally and performing a specified developing processing and the like to the photosensitive material to make a print (photograph) reproduced from the on-film image.
On the other hand, recording conditions under which an image is recorded on a film are not fixed and there are many cases where a large amount of difference, i.e., an extremely broad dynamic range, exists between brightness and darkness (densities) such as found in an image recorded using an electronic flash, a backlighted scene and the like.
As a result, when such a film image is exposed by a conventional method to obtain a finished print, there is a tendency that details become imperceptible due to insufficient gradation either in a bright (highlight) portion or a dark (shadow) portion on the print. For example, when a picture of a human individual is recorded against the light, if the picture is exposed such that the image of the person may be preferably clear, the bright portion, such as a sky region, will wash out and become white and its details will become imperceptible. Whereas, if the picture is exposed such that the bright portion, such as the sky region, may become preferably clear, the image of the person will become dull and black and its details will become imperceptible.
Therefore, when a photosensitive material is exposed using a film image having a large difference between brightness and darkness as an original image, there have heretofore been employed a so-called dodging technique.
The dodging technique is a method of obtaining a finished print in which a proper image is reproduced over an entire picture in a manner that an ordinary level of exposure is carried out to a portion having an intermediate image density, an amount of exposure light is increased to a bright (highlight) portion where an image tends to wash out and become white and an amount of exposure light is reduced to a dark (shadow) portion where an image tends to become dull and black, to thereby correct a very bright portion and a very dark portion of the image recorded on film so as to bring the image closer to an impression which people have of an original scene.
Therefore, conventional apparatuses using the direct exposure employ the dodging technique to locally or entirely modify an amount of exposure light in accordance with an image recorded on a film. More specifically, the dodging technique uses a method of carrying out exposure by inserting a blocking plate, an ND filter or the like into an exposure light passage, a method of locally changing an amount of light produced by an exposure light source and a method of forming monochrome films by reversing the bright portion and the dark portion of an image recorded on film and carrying out exposure by superimposing the films, and the like.
On the other hand, the digital photoprinter utilizes a method enabling to reproduce the image closer to the impression of the original scene with a higher degree of freedom by employing image data processing which compresses a dynamic range (hereinafter called as employing dodging processing) of the image so as to preferably reproduce the bright and dark portions than that by employing the dodging processing at the above described direct exposure. Applicants of the present invention have already proposed such method in applications (see JP-A-9-18704 and JP-A-9130609).
Digital image data processing is generally performed by the steps of reading an image recorded on a film photoelectrically to obtain image data, analyzing the thus obtained image data and setting image processing conditions and the like of dodging processing. However, a difference between the image on film (its reproduced image) and the impression of the original scene exists in many cases according to the kind of the scene of the original image, luminance of the original scene and conditions of rays.
Therefore, bringing an output image closer to the impression of the original scene is limited, even if the optimal dodging processing conditions are set according to the image data.
In other words, since the dodging processing has generally been performed in a region of luminance signal (gray), a problem arises to the effect that a sky portion will have the grayish tint of color, when the sky portion or the like is subjected to the dodging processing.
Moreover, another problem also arises to the effect that, when the density of the sky portion is increased, the saturation of the sky portion must concurrently be increased. Unless otherwise the color of sky comes apart from what is resolved to be inherent, that is, a memory color.
In view of the above problems in the prior art, it is an object of the present invention is to provide an image processing apparatus for processing an input image data obtained from an image recorded on film into output image data and for being preferably utilized in the above digital photoprinter, being capable of reproducing a image close to an impression of an original scene even when dodging processing is per formed, and being capable of controlling gradations region by region, for example, gradation-softening a contrast of a face of a person without changing a contrast of a background region in the image recorded in a fine weather and the like, or gradation-hardening the contrast of the background region without changing the contrast of the face of the person in the image recorded in a cloudy weather and the like.
To achieve the above object, the present invention provides an image processing apparatus which applies specified image processing to image data read photo electrically an image recorded on a film by image reading means so as to form output image data, comprising:
an unsharp weighting image forming section for forming from the image data an unsharp weighting image which connects a principal subject region and a background region to each other smoothly;
a color reproduction parameter forming section for forming at least one of a color reproduction parameter of the principal subject region and a color reproduction parameter of the background region; and
an output image forming section for forming the output image data by using at least one of the color reproduction parameter of the principal subject region which is weighted with a weight of the unsharp weighting image and the color reproduction parameter of the background region which is weighted with the remainder obtained by subtracting the weight of the unsharp weighting image from a reference value.
It is preferable here that the unsharp weighting image forming section includes a region extracting subsection for dividing the image data into the principal subject region and the background region, a weighting mask forming subsection for forming a weighting mask relative to the principal subject region and an unsharp mask processing subsection for subjecting to unsharp mask processing a weighting image which weights the principal subject region so as to form the unsharp weighting image.
Moreover, it is preferable that the region extracting subsection divides the image data into the principal subject region and the background region either by automatic analysis of the image or by performing an auxiliary inputting due to an operator and the weighting mask forming subsection forms a weighting mask by analyzing color image data of the principal subject region and then calculating a color balance relative to brightness of the principal subject region and finally setting weight function putting the thus obtained calculated color balance in an intermediate range. Furthermore, it is preferable that the weighting mask forming subsection sets the weight function as a look-up table.
Moreover, it is preferable that the unsharp mask processing subsection forms the unsharp weighting image using the image data obtained by prescanning which reads the image in low resolution by the image reading means prior to fine scanning which reads the image for forming the output image data, and also performs expansion/compression processing to the unsharp weighting image when the output image data is formed from the image data obtained by the fine scanning. Alternatively, it is also preferable that the unsharp mask processing subsection forms directly the unsharp weighting image by using the image data obtained by fine scanning which reads the image by the image reading means for forming the output image data.
Moreover, it is preferable that the color reproduction parameter forming section forms image data for principal subject area analysis which is obtained by multiplying the image data by the weight of the unsharp weighting image and image data for background area analysis which is obtained by multiplying the image data by the remainder obtained by subtracting the weight of the unsharp weighting image from a reference value, and also forms a color reproduction parameter of the principal subject region by multiplying correction gradation of the, principal subject region which is either calculated from characteristic amounts of the image data for the principal subject area analysis and the image data for the background area analysis or inputted by an operator by the weight of the unsharp weighting image, in combination with signals to be added to the image data. In this case, it is preferable that the signals to be added to the image data are at least one of R, G and B signals of three primary colors and a luminance signal.
Meanwhile, the characteristic amounts include a dynamic range, an average density, a pixel density distribution, a color balance of a highlight region, a color balance of a middle density region and a color balance of a shadow region and the like.
Moreover, it is preferable that the color reproduction parameter forming section performs at least one of the steps of:
increasing in gradation softness by placing stress on a highlight region, when the principal subject region is skin and a highlight region and a shadow region exist within the principal subject region and the shadow region is larger than the highlight region;
performing a density shift into within a color reproduction range, when the principal subject region is skin and the principal subject region is almost out of the color reproduction range;
correcting into a magenta tint in gradation, when the principal subject region is skin and a color balance of a highlight region of the principal subject region is bluish; and
increasing the gradation in hardness with respect to the background but not increasing in gradation hardness with respect to a gradation of a human individual region.
Moreover it is preferable that color processing relative to the image data is performed by at least one of R, G and B signals of three primary colors and a luminance signal.
Moreover, it is preferable that the color reproduction parameter of the background region is used by inputting a gradation in accordance with a scene prepared previously by an operator or by selecting an appropriate gradation by an image analysis among gradations in accordance with scenes, or otherwise, by selecting an appropriate gradation among gradations which have been adjusted by a user and registered previously. In this case, it is preferable that the gradation or gradations in accordance with the scene or scenes include at least one of a snow gradation where the highlight region becomes a cyan tint, a sky gradation where cyan becomes blue blackish tint and a mountain gradation where green becomes bright green.
Furthermore, it is preferable that the reference value is set as 1 and the unsharp weighting image is normalized with 1.